<script setup>
import {ref} from "vue";
import {paramListService} from "@/api/param.js";
import {useRoute} from "vue-router";
import {ElMessage} from "element-plus";

const params = ref({})
const getInit = async () => {
  console.log(typeof useRoute().params.id)
  if (useRoute().params.id === '') {
    ElMessage.error("请通过商品分类跳转该页面！")
    return
  }
  params.value = await paramListService(useRoute().params.id)
}
getInit()
</script>
<template>
  <el-card>
    {{ params }}
  </el-card>
</template>

<style lang="scss" scoped>

</style>
